﻿using B.S.DataBase.MyProject.ErrorCode;
using MediatR;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace MedicalPCTerminal.Write.API.Appcation.Commands.Management
{
    /// <summary>
    /// 添加基础信息命令
    /// </summary>
    public class AddBasicCommand : IRequest<APIResult<object>>
    {
        /// <summary>
        /// 姓名
        /// </summary>
        [Required]
        [StringLength(50)]
        public  string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        [StringLength(10)]
        public  string Sex { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [StringLength(20)]
        public  string PhoneNumber { get; set; }

        /// <summary>
        /// 慢病毒病种
        /// </summary>
        [StringLength(100)]
        public  string ChronicVirusDisease { get; set; }
        
        /// <summary>
        /// 计划随访时间
        /// </summary>
        public DateTime ScheduledFollowUpTime { get; set; }

        /// <summary>
        /// 随访方案
        /// </summary>
        [StringLength(200)]
        public  string FollowUpPlan { get; set; }

        /// <summary>
        /// 失访原因
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? LossToFollowUpReason { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? Remarks { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? Status { get; set; }
        
        /// <summary>
        /// 随访时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime FollowUpTime { get; set; }
        
        /// <summary>
        /// 随访人
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? UpName { get; set; }
    }
}
